#include "Leaf.h"
#include <iostream>

using namespace std;

Leaf::Leaf(string name):Component(name){
}

Leaf::~Leaf(){
}

void Leaf::Add(const Component* c){
	cout << "Cannot add to a leaf" <<endl;
}

void Leaf::Remove(const Component* c){
	cout << "Cannot remove from a leaf" <<endl;
}

void Leaf::Display(int depth){
	for (int i = 0; i < depth; i++)
	{
		cout<< "-";
	}
	cout<< _name <<endl;
}